home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok40.lha
/
Environment
/
IntuiSup.Mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
3KB
|
98 lines
IMPLEMENTATION MODULE IntuiSup;
(*---------------------------------------------------------------------------
:Program. IntuiSup
:Version. 1.5
:History. Jan-88
:Author. Markus Peuckert
:Address. Schützenstr. 50, D-3550 Marburg, West-Germany,
:Copyright. ShareWare
:Language. Modula-2
:Translator. M2Amiga V3.3d
---------------------------------------------------------------------------*)
FROM SYSTEM IMPORT ADR, ADDRESS;
FROM Intuition IMPORT Gadget, GadgetFlags, GadgetFlagSet, Border, StringInfo,
boolGadget, strGadget, ActivationFlags, ModifyIDCMP,
ActivationFlagSet, IDCMPFlags, IDCMPFlagSet,
WindowFlags, WindowFlagSet, WindowPtr, NewWindow,
OpenWindow, ScreenFlags, ScreenFlagSet, IntuiText,
OpenIntuition, IntuitionBasePtr;
FROM Graphics IMPORT jam1;
VAR IntuiBasePtr : IntuitionBasePtr;
PROCEDURE InitBorder (VAR Bord : Border; xyData, next : ADDRESS);
BEGIN
WITH Bord DO
leftEdge:=-1; topEdge:=-1; frontPen:=1; backPen:=0; drawMode:=jam1;
count:=5; xy:=xyData; nextBorder:=next
END
END InitBorder;
PROCEDURE InitStringInfo (VAR Info : StringInfo;
VAR buf, unbuf : ARRAY OF CHAR);
BEGIN
WITH Info DO
buffer:=ADR(buf); undoBuffer:=ADR(unbuf); bufferPos:=0;
maxChars:=HIGH(buf); dispPos:=0
END
END InitStringInfo;
PROCEDURE InitIText (VAR IText : IntuiText; x,y : INTEGER; text : ADDRESS);
BEGIN
WITH IText DO
frontPen:=1; backPen:=0; drawMode:=jam1; leftEdge:=x; topEdge:=y;
nextText:=NIL; iText:=text
END
END InitIText;
PROCEDURE CreateGadget (VAR Gad : Gadget; x,y,w,h,ID : INTEGER; Type:CARDINAL;
next, Info, Bord, Text : ADDRESS;
Activ : ActivationFlagSet);
BEGIN
WITH Gad DO
nextGadget:=next; leftEdge:=x; topEdge:=y; width:=w;
height:=h; flags:=GadgetFlagSet{}; gadgetType:=Type;
gadgetRender:=Bord; selectRender:=NIL; gadgetText:=Text;
specialInfo:=Info; gadgetID:=ID; userData:=NIL; activation:=Activ
END;
END CreateGadget;
PROCEDURE CreateWindow(x,y,w,h : INTEGER; if: IDCMPFlagSet; wf: WindowFlagSet;
gad,scr,tit : ADDRESS; typ : ScreenFlagSet) : WindowPtr;
VAR
nw: NewWindow;
BEGIN
WITH nw DO
leftEdge:=x; topEdge:=y; width:=w; height:=h; detailPen:=0; blockPen:=1;
idcmpFlags:=if; flags:=wf; firstGadget:=gad; checkMark:=NIL; title:=tit;
screen:=scr; bitMap:=NIL; minWidth:=160; minHeight:=14; maxWidth:=w;
maxHeight:=h; type:=typ
END;
RETURN OpenWindow(nw)
END CreateWindow;
PROCEDURE IDCMPOn (window : WindowPtr; flags : IDCMPFlagSet);
BEGIN
ModifyIDCMP (window, flags)
END IDCMPOn;
PROCEDURE IDCMPOff (window : WindowPtr);
BEGIN
ModifyIDCMP (window, IDCMPFlagSet{})
END IDCMPOff;
PROCEDURE ActivWindow () : WindowPtr;
BEGIN
RETURN IntuiBasePtr^.activeWindow
END ActivWindow;
BEGIN
IntuiBasePtr := OpenIntuition();
END IntuiSup.Mod